// Header Protection
#ifndef _STOPWATCH_H_
#define _STOPWATCH_H_

// Namespace
namespace IE
{
	/////////////////////////////////////////////////////////////////////////////////
	// This class keeps track of time elapsed since it's last reset.
	class stopwatch_t
	{
	public:     // methods

		// Initialize the stopwatch
		stopwatch_t();

		// Copy another stopwatch
		stopwatch_t(stopwatch_t const &_rhs );

		// Set this stopwatch equal to another
		stopwatch_t &operator =(stopwatch_t const &_rhs );

		// Start the stopwatch at zero time.
		inline void Start() { Reset(); }

		// Reset the stopwatch to zero time.
		void Reset() { QueryPerformanceCounter( (LARGE_INTEGER *)&m_iStartTime ); }

		// Get the time elapsed since the last call to Start or Reset.
		// return: float_t - time passed in seconds
		float_t Elapsed();

	private:    // data
		int64_t m_iStartTime;
		int64_t m_iFrequency;
	};
}

// Header Protection
#endif // _STOPWATCH_H_
